package dm_tool
{
	import mx.collections.ArrayCollection;
		
	/**
	 * 
	 * @author jrags
	 * 
	 */		
	[Bindable]
	public class Power
	{
		private var _name:String;
		public function get name():String
		{
			return this._name;
		}
		private var _powerUsage:String;
		public function get powerUsage():String
		{
			return this._powerUsage;
		}
		private var _actionType:String;
		public function get actionType():String
		{
			return this._actionType;
		}
		private var _weapons:ArrayCollection;;
		public function get weapons():ArrayCollection
		{
			return this._weapons;
		}
		public function set weapons(value:ArrayCollection):void
		{
			this._weapons = value;
		}
		private var _used:Boolean;
		public function get used():Boolean
		{
			return this._used;
		}
		public function set used(value:Boolean):void
		{
			this._used = value;
		}
		
		public function Power(powerXml:XML=null)
		{
			if (powerXml is XML)
			{
				this._name 				= powerXml.@name;
				this._powerUsage 		= powerXml.specific.(@name  ==  "Power Usage");
				this._actionType 		= powerXml.specific.(@name  ==  "Action Type");
				this._weapons			= new ArrayCollection();
				this._used				= false;
			}
		}
	}
}